@extends("/paging_template",minWidd_th=1000,title="用户列表")
@import com.mgfireworks.mgplatform.mgadmin.user.model.*
@args List<User> userList, List<Role> roleList
<s_panel>
	<s_input name="userName" text="用户名称" value="@val("userName")"></s_input>
	<s_chooser name="orgName" value="@val("orgName")" name2="orgId" value2="@val("orgId")" text="所属机构" url="@url("/sys/org/select.html")"></s_chooser>
	<s_select name="userRole" text="用户角色">
        @for(Role r : roleList){
        <option value="@r.getRoleId()">@r.getRoleName()</option>
        }
	</s_select>
	<s_buttons slot="button" cols="4">
		<s_button type="query"></s_button>
		<s_button type="link" icon="fa-plus" href="@url("add.html")">添加</s_button>
		<s_button type="link" icon="fa-pencil" href="@url("edit.html?userId={0}")">修改</s_button>
		<s_button type="del" href="@url("del.json?userId={0}")">删除</s_button>
	</s_buttons>
</s_panel>
<d_table min-width="1000px">
    <d_tr slot="head">
        <d_th class="d_th_row_id"></d_th>
        <d_th>用户编号</d_th>
        <d_th>用户账号</d_th>
        <d_th>用户名称</d_th>
        <d_th>所属机构</d_th>
        <d_th>用户角色</d_th>
        <d_th>最后登录时间</d_th>
        <d_th>最后登录IP</d_th>
    </d_tr>
    @if(userList){
    @{int i=0;}
    @for(User p : userList){
    <d_tr slot="body" class="table_row @(i%2==0?"odd":"event")">
    @{i++;}
    <d_th class="td_row_id">
        <input type="checkbox" class="flat" name="__recordId" value="@p.getUserId()"/>
    </d_th>
    <d_th>@p.getUserId()</d_th>
    <d_th>@p.getUserAccount()</d_th>
    <d_th>@p.getUserName()</d_th>
    <d_th>@p.getOrgName()</d_th>
    <d_th>@p.getRoleName()</d_th>
    <d_th>@p.getLastLoginTime()</d_th>
    <d_th>@p.getLastLoginIp()</d_th>
    </d_tr>
    }}
</d_table>
